]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
7 years agoshell-util: Do not scale the clip in get_content_for_window_actor()
Robert Mader [Sat, 14 Sep 2019 17:24:36 +0000 (19:24 +0200)]
shell-util: Do not scale the clip in get_content_for_window_actor()

This is now handled in Mutter. Also, respect the result size instead
of assuming it to be equal to the clip size, as the clip takes actor
coordinates while the result takes buffer coordinates.

This can be fixed in a future API iteration.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/728

7 years agoUpdate Galician translation
Fran Dieguez [Fri, 20 Sep 2019 17:19:17 +0000 (17:19 +0000)]
Update Galician translation

7 years agoscreenShield: Stop using deprecated actor property
Florian Müllner [Fri, 20 Sep 2019 11:14:40 +0000 (13:14 +0200)]
screenShield: Stop using deprecated actor property

Both LoginDialog and UnlockDialog are now actor subclasses, so stop
using the deprecated actor delegate that will trigger a warning.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736

7 years agounlockDialog: Use inheritance instead of composition
Florian Müllner [Fri, 20 Sep 2019 11:17:40 +0000 (13:17 +0200)]
unlockDialog: Use inheritance instead of composition

The screen shield creates the unlock dialog based on the session mode.

However since commit 0c0d76f7d6990 turned LoginDialog into an actor
subclass (while UnlockDialog kept using the delegate pattern), it is
no longer possible to handle both objects the same way without warnings.

Allow this again by turning UnlockDialog into an actor subclass as well.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736

7 years agologinDialog: Stop using deprecated actor property
Florian Müllner [Fri, 20 Sep 2019 11:09:13 +0000 (13:09 +0200)]
loginDialog: Stop using deprecated actor property

Commit 0c0d76f7d6990 made the class an actor subclass, so the actor
property is just a deprecated synonym of the object itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736

7 years agoenvironment: Try harder to find a transition
Florian Müllner [Fri, 20 Sep 2019 00:50:36 +0000 (02:50 +0200)]
environment: Try harder to find a transition

When easing, we need the transition of one of the involved properties
to connect our callbacks. Currently we simply get the transition for
the first property, however as Clutter optimizes the case where a
property doesn't actually change, that transition may be NULL even
though we still animate other properties.

So instead of only looking at the transition of the first property,
try to find a transition for any of the involved properties.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1572

7 years agolayout: Don't use the actors pick workaround on update regions
Marco Trevisan (Treviño) [Thu, 19 Sep 2019 09:46:39 +0000 (11:46 +0200)]
layout: Don't use the actors pick workaround on update regions

As per introduction of geometric picking in mutter [1], the workaround we
had consisting in picking all the actors to ensure that all the stage
projections were computed to get valid actors stage-transformed coordinates
and sizes is not working anymore as there is more caching involved.

However since this can be now handled properly in mutter [2], initializing a
valid projection matrix since the beginning, we can get rid of the
workaround.

[1] https://gitlab.gnome.org/GNOME/mutter/commit/14c706e51
[2] https://gitlab.gnome.org/GNOME/mutter/merge_requests/803

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/734

7 years agorenameFolderMenu: Use a custom menu item inheriting from PopupBaseMenuItem
Marco Trevisan (Treviño) [Sat, 14 Sep 2019 01:03:15 +0000 (03:03 +0200)]
renameFolderMenu: Use a custom menu item inheriting from PopupBaseMenuItem

The RenameFolderMenu uses the internal box as a menu item, while PopupMenu
expects to have PopupBaseMenuItem based children with a delegate set.

Instead of using a custom menu with a customized box acting as menu
item,just add a RenameFolderMenuItem that inherits from the parent,
adjusting the features as we need them. In fact, the rename folder menu item
doesn't need any label, padding or default styling so we can reuse
PopupMenuBaseItem after we use our styling properties and we set the
Ornament to HIDDEN.

To get the proper style in place, define rename-folder-popup and
rename-folder-popup-item to override the default popup-menu-item rule
padding instead of using margins.

Pass the menu item as menu's focusActor as this will key-focus it on pop-up,
by overriding the key_focus_in() vfunc we can then delegate the focus
handling to the entry's clutter-text.

Also override the map() vfunc in order to update the entry's content before
mapping the entry.

Finally, use the item's activate method in order to tell the parent menu
we're done with it and that the menu can be closed.

As consequence we can also remove the menu's popup() method, and just use
the default open().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720

7 years agorenameFolderMenu: Move to non-legacy coding style
Marco Trevisan (Treviño) [Fri, 13 Sep 2019 03:19:02 +0000 (05:19 +0200)]
renameFolderMenu: Move to non-legacy coding style

Use proper indentation on multi-line methods calls and use single quotes on
button label.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720

7 years agorenameFolderMenu: Set the entry as menu focus actor
Marco Trevisan (Treviño) [Wed, 11 Sep 2019 18:09:08 +0000 (20:09 +0200)]
renameFolderMenu: Set the entry as menu focus actor

When the rename folder menu is opened the text entry is expected to be
focused and selected for a quick editing.
While this is required it doesn't actually happens since PopupMenu by
default gives the key focus to the source actor, that is then free to pass
the key focus to the menu if there's an user interaction.

In this case however, we want the text entry to be focused once we prompt
the menu, so just use the PopupMenu's focusActor property to ensure it will
handle it for us.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1604
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720

7 years agopopupMenu: Add focusActor property to define the default focus actor
Marco Trevisan (Treviño) [Fri, 13 Sep 2019 03:15:41 +0000 (05:15 +0200)]
popupMenu: Add focusActor property to define the default focus actor

The PopupMenuManager is supposed to grab and focus the menu actors, with
normal menus we always need to grab the actual menu but set the key focus to
the source actor so that it will be able to move the focus to the menu
child, if requested.

However there are menus such as the RenameFolderMenu that requires the
key-focus once prompted, so provide a focusActor property (defaulting to the
sourceActor) that can be set in order to define the actor to give the
keyboard focus to, when the menu is popped-up.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1604
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720

7 years agopopupBaseMenuItem: Add support for Hidden Ornament
Marco Trevisan (Treviño) [Fri, 13 Sep 2019 15:59:16 +0000 (17:59 +0200)]
popupBaseMenuItem: Add support for Hidden Ornament

The menu item ornament is used to put dots or checks in menus or otherwise
to define a padding for a label.
However in some cases we want to create a menu item with no left (in ltr)
padding.

In order to do that, define a HIDDEN Ornament mode that completely hides the
ornament actor.

The naming here might be confusing as this should probably be called NONE,
while the default mode is the invisible one, but it's too late to change it
now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720

7 years agorenameFolderMenu: Don't save the source
Marco Trevisan (Treviño) [Wed, 11 Sep 2019 18:14:27 +0000 (20:14 +0200)]
renameFolderMenu: Don't save the source

The source actor is already tracked by the PopupMenu internally as
sourceActor, while nothing in RenameFolderMenu uses the source, so we can
drop this.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720

7 years agofolderIcon: Remove duplicated addMenu call
Marco Trevisan (Treviño) [Fri, 13 Sep 2019 03:17:03 +0000 (05:17 +0200)]
folderIcon: Remove duplicated addMenu call

The RenameFolderMenu is added already to its menu manager, so no need to
repeat the operation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720

7 years agoworkspace: Fix an incorrect signal check
Jonas Dreßler [Fri, 20 Sep 2019 09:37:26 +0000 (11:37 +0200)]
workspace: Fix an incorrect signal check

While commit 3094f863 was intended to cancel the ongoing idle hide
timeout before we start a new one, a mistake slipped in there while
rebasing: Obviously we should check if the signal id is NOT 0 here.

This didn't prevent timeouts being started while old ones are still
running and did override `this._idleHideOverlayId`, which caused the old
timeouts to run indefinitely after an overlay actor was destroyed
because we fail early (and don't return TRUE) in `_idleHideOverlay()`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/735

7 years agoappDisplay: Animate DnD app icons at the position they were dropped
Jonas Dreßler [Sun, 15 Sep 2019 09:45:47 +0000 (11:45 +0200)]
appDisplay: Animate DnD app icons at the position they were dropped

Indicate whether dropping an app icon was successful or not by using the
newly added `animateLaunchAtPos()` API of AppIcon which starts a zoom
out animation of the icon at the position the drop happened.

To get the position of the drag actor, we have to forward the arguments
passed to `acceptDrop()` and `handleDragOver()` to the internal drag
handlers of the WorkspaceThumbnails. We can use this position directly
without transforming it to stage coordinates because the actor is a
child of `Main.uiGroup` and the animation actor will also be a child of
this container.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121

7 years agoappDisplay: Add API to animate launch at given position
Jonas Dreßler [Sun, 15 Sep 2019 09:40:27 +0000 (11:40 +0200)]
appDisplay: Add API to animate launch at given position

Add a `animateLaunchAtPos()` method to the AppIcon class to animate the
launch of an app at a given position. This allows for a visual
indication of whether dropping an app icon using DnD was successful at
the position the drop happened in a later commit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121

7 years agoworkspace: Return results of forwarded acceptDrop
Jonas Dreßler [Thu, 2 May 2019 15:49:21 +0000 (17:49 +0200)]
workspace: Return results of forwarded acceptDrop

Return the results of calls to acceptDrop that we forwarded to the
Workspace object.

This fixes a bug where app icons that were dragged and released above a
window clone would get animated back to their original position
(indicating that nothing happened) even though they opened correctly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121

7 years agooverview: Only accept AppIcon drops if the app can open a new window
Jonas Dreßler [Thu, 2 May 2019 15:04:03 +0000 (17:04 +0200)]
overview: Only accept AppIcon drops if the app can open a new window

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121

7 years agoshell-app: Never allow opening new windows while an app is starting
Jonas Dreßler [Thu, 1 Aug 2019 15:22:50 +0000 (17:22 +0200)]
shell-app: Never allow opening new windows while an app is starting

We allow opening new windows as a fallback in case the app doesn't give
us explicit information about it, but we don't want to allow opening new
windows if we're unable to ask for this information (we can only use the
APIs to get this information while the app is RUNNING).

So always return FALSE in case the app is STARTING, always return TRUE
in case the app is STOPPED (starting an app always opens a new window)
and go through the usual checks in case the app is RUNNING (and
eventually fall back to FALSE).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121

7 years agoworkspace: Use AppIcon.app to check action-support by the drag source
Jonas Dreßler [Fri, 2 Aug 2019 10:58:34 +0000 (12:58 +0200)]
workspace: Use AppIcon.app to check action-support by the drag source

`AppIcon.shellWorkspaceLaunch()` can easily be replaced by checking for
`AppIcon.app` and calling `AppIcon.app.open_new_window()` directly.

For compatibility and to prevent breaking extensions implementing the
function, keep supporting the `shellWorkspaceLaunch` API in AppIcon
while logging a deprecation warning. Also keep supporting the API on
drag sources (without deprecating it) to allow extensions to define
custom actions on their drag sources.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121

7 years agointrospect: Check whitelist also for GetRunningWindows()
Jonas Ådahl [Wed, 18 Sep 2019 12:57:48 +0000 (14:57 +0200)]
introspect: Check whitelist also for GetRunningWindows()

Otherwise the xdg-desktop-portal-gtk screen cast widget won't work.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/732

7 years agost: Fix box-shadow drawing with prerendered_texture
Daniel García Moreno [Wed, 18 Sep 2019 14:50:49 +0000 (16:50 +0200)]
st: Fix box-shadow drawing with prerendered_texture

The use of box-shadow on a StWidget that has a background-gradient was
not been rendered correctly, the shadow borders was calculated inside
the st_theme_node_prerender_shadow function and in the case that we've a
prerendered_texture the max_borders was not calculated and are 0.

This patch creates a new static function to compute shadow maximum
borders copying the code from st_theme_node_prerender_shadow, and call
this new method in the case that we've a prerendered_texture.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1186

7 years agoworkspace: Remove unused properties of WindowClone
Jonas Dreßler [Mon, 19 Aug 2019 09:54:42 +0000 (11:54 +0200)]
workspace: Remove unused properties of WindowClone

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683

7 years agoviewSelector: Only reset search entry if it has key focus
Jonas Dreßler [Sun, 18 Aug 2019 10:49:42 +0000 (12:49 +0200)]
viewSelector: Only reset search entry if it has key focus

If the search entry does not have any text typed in and a button press
happens outside of the search entry, we set key focus to NULL to make
the search entry appear unfocused.

This is quite intrusive and can easily cause unwanted focus changes, so
change the captured-event handler to only call `reset()` if the search
entry actually is focused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683

7 years agoworkspace: Reset idle hide timeout for overlays on reentry
Jonas Dreßler [Tue, 12 Feb 2019 12:04:55 +0000 (13:04 +0100)]
workspace: Reset idle hide timeout for overlays on reentry

Instead of returning and waiting until the old timeout is finished,
start a new idle hide timeout for the overlay when the pointer enters a
window clone. This makes sure the timeout for hiding the overlay after
the pointer left the clone mostly stays the same (except when leaving
the clone via the title or the close button).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683

7 years agoworkspace: Make title of overlay reactive
Jonas Dreßler [Tue, 12 Feb 2019 12:04:55 +0000 (13:04 +0100)]
workspace: Make title of overlay reactive

Also make the title of the overlay reactive so we can keep the overlay
visible if the mouse is hovering over the title.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683

7 years agoworkspace: Continue overlay idle hide timeout when pointing at close button
Jonas Dreßler [Tue, 12 Feb 2019 12:04:55 +0000 (13:04 +0100)]
workspace: Continue overlay idle hide timeout when pointing at close button

While it makes sense to remove the timeout in every other case, restart it
if the pointer is hovering over the close button to make sure the overlay
will be hidden afterwards.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683

7 years agoUpdate Norwegian Bokmål translation
Kjartan Maraas [Wed, 18 Sep 2019 13:34:34 +0000 (13:34 +0000)]
Update Norwegian Bokmål translation

7 years agoUpdate French translation
Charles Monzat [Tue, 17 Sep 2019 18:47:13 +0000 (18:47 +0000)]
Update French translation

7 years agoUpdate French translation
Alexandre Franke [Tue, 17 Sep 2019 11:44:09 +0000 (11:44 +0000)]
Update French translation

7 years agoutil: Handle trailing LTR/RTL markers in URLs
Florian Müllner [Fri, 13 Sep 2019 22:03:02 +0000 (00:03 +0200)]
util: Handle trailing LTR/RTL markers in URLs

Some electron apps apparently spread those generously over their
notification text, so may sure to not include them accidentally
in URLs.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1614

7 years agocleanup: Don't add linebreak before operators
Florian Müllner [Mon, 19 Aug 2019 19:33:15 +0000 (21:33 +0200)]
cleanup: Don't add linebreak before operators

When breaking overly long conditions into multiple lines, the operator
should end the previous line instead of starting the new one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Disambiguate assignments in arrow functions
Florian Müllner [Mon, 19 Aug 2019 20:20:35 +0000 (22:20 +0200)]
cleanup: Disambiguate assignments in arrow functions

As arrow functions have an implicit return value, an assignment of
this.foo = bar could have been intended as a this.foo === bar
comparison. To catch those errors, we will disallow these kinds
of assignments unless they are marked explicitly by an extra pair
of parentheses.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Remove trailing spaces
Florian Müllner [Thu, 12 Sep 2019 15:26:08 +0000 (17:26 +0200)]
cleanup: Remove trailing spaces

We generally avoid these (not least because Linus hates them enough
to make git complain loudly), but some sneaked in over time ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Fix up "special" comments
Florian Müllner [Tue, 20 Aug 2019 00:31:52 +0000 (02:31 +0200)]
cleanup: Fix up "special" comments

Our coding style asks for a space after the comment start, which
some of our ASCII-artsy comments violate. Adjust them to fit the
rule, or remove them altogether.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Use consistent brace style of blocks
Florian Müllner [Tue, 20 Aug 2019 00:51:42 +0000 (02:51 +0200)]
cleanup: Use consistent brace style of blocks

Our coding style has always been to either put braces around all
blocks, or avoid them for all. Fix the couple of places that slipped
through.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Avoid pointless "renames" in destructuring
Florian Müllner [Thu, 12 Sep 2019 15:19:51 +0000 (17:19 +0200)]
cleanup: Avoid pointless "renames" in destructuring

ES5 allows to rename variables in object destructuring, however this
only makes sense when we want to use a different name than the object
property.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Avoid unnecessary parentheses in arrow functions
Florian Müllner [Sat, 14 Sep 2019 15:02:29 +0000 (17:02 +0200)]
cleanup: Avoid unnecessary parentheses in arrow functions

Parentheses are only needed if there are zero or multiple arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Avoid useless return statements
Florian Müllner [Mon, 19 Aug 2019 19:37:15 +0000 (21:37 +0200)]
cleanup: Avoid useless return statements

Return statements are only useful if they return a value or break
the regular function flow (i.e. early returns). Remove all returns
that do neither.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agocleanup: Don't use Array/Object constructors
Florian Müllner [Mon, 19 Aug 2019 19:18:54 +0000 (21:18 +0200)]
cleanup: Don't use Array/Object constructors

The corresponding literals are more concise and cleaner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agoscripting: Disable an eslint warning
Florian Müllner [Tue, 20 Aug 2019 00:36:36 +0000 (02:36 +0200)]
scripting: Disable an eslint warning

Calling await in a loop means the asynchronous operations are
run sequentially instead of in-parallel. Usually that's not
what's wanted, so eslint has a rule to warn about this.

However here we use async/await to handle control back to the
mainloop between steps, so running operations sequentially is
actually intended.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agovolume: Clarify some code
Florian Müllner [Sat, 14 Sep 2019 12:33:09 +0000 (14:33 +0200)]
volume: Clarify some code

We have more idiomatic ways to check whether any element fullfills
some condition than breaking out of a loop.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agomagnifier: Do not modify function argument
Florian Müllner [Mon, 19 Aug 2019 19:18:54 +0000 (21:18 +0200)]
magnifier: Do not modify function argument

The intention of the code is clearly to operate on a copy, but that's
not how the Object constructor works. While it doesn't matter in
practice that we modify the passed-in object parameter, it's still
a good idea to fix the code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agomagnifier: Simplify some code
Florian Müllner [Tue, 20 Aug 2019 02:10:46 +0000 (04:10 +0200)]
magnifier: Simplify some code

We don't need nested if blocks to set or unset the crosshairs'
clip size.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

7 years agolint: Drop extra ignored nodes in legacy config
Florian Müllner [Thu, 12 Sep 2019 22:40:24 +0000 (00:40 +0200)]
lint: Drop extra ignored nodes in legacy config

They didn't just allow for the style patterns they were added to,
but allowed for some messed up indentation to slip through. Now
that we adapted the code to not use the old style, it's time to
drop the exceptions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725

7 years agocleanup: Switch some method calls to new indentation style
Florian Müllner [Thu, 12 Sep 2019 22:41:47 +0000 (00:41 +0200)]
cleanup: Switch some method calls to new indentation style

The legacy indent rule currently ignores arrow functions in parameters
to allow callbacks to not align with the other arguments:

    this._someFunctionWithFairlyLongishName(arg1, arg2, arg3,
        () => {
            this._someOtherFunctionWithLongName(arg1);
        });

But as ignoring entire nodes means we can end up with arbitrary
indentation, we should drop the exception. While this would make
the above "illegal" under the legacy config, it conforms with the
non-legacy style, so everything should be fine ...

... except that eslint starts to complain about some function args
that should be fine under the legacy config. Maybe it's thrown off
by the function-arg-in-arrow-function-in-function-arg structure, but
rather than figuring it out, let's just move those to the new style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725

7 years agocleanup: Use consistent style for ternary operator
Florian Müllner [Mon, 19 Aug 2019 19:33:15 +0000 (21:33 +0200)]
cleanup: Use consistent style for ternary operator

We are currently inconsistent whether to put the operators in front
of the corresponding line or at the end of the preceding one. The
most dominant style for now is to put condition and first branch on
the same line, and then align the second branch:

  let foo = condition ? fooValue
                      : notFooValue;

Unfortunately that's a style that eslint doesn't support, so to account
for it, our legacy configuration currently plainly ignores all indentation
in conditionals.

In order to drop that exception and not let messed up indentation slip
through, change all ternary operators to the non-legacy style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725

7 years agocleanup: Fix wrong indentation
Florian Müllner [Thu, 12 Sep 2019 22:27:56 +0000 (00:27 +0200)]
cleanup: Fix wrong indentation

Some more places where the indentation doesn't comply with either
the old or new style. They slipped through because the legacy eslint
configuration accounts for some patterns by plainly ignoring certain
nodes. We'll address that later, first fix up the indentation errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725

7 years agotheme: Equalize dimensions of ws switcher popup boxes
Martin Zurowietz [Sun, 5 May 2019 11:12:09 +0000 (13:12 +0200)]
theme: Equalize dimensions of ws switcher popup boxes

The indicator for the active workspace is currently two pixels
smaller because it doesn't account for the border used for
inactive workspaces.

Fix that to make sure all indicators have the same size.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1243

7 years agooverview: Fix fading out desktop icons
Harshula Jayasuriya [Sat, 14 Sep 2019 11:39:28 +0000 (21:39 +1000)]
overview: Fix fading out desktop icons

A typo in commit 0846238f69ad1 broke the animation.

Signed-off-by: Harshula Jayasuriya <harshula@hj.id.au>
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1616

7 years agoUpdate Serbian translation
Марко Костић [Fri, 13 Sep 2019 19:43:24 +0000 (19:43 +0000)]
Update Serbian translation

7 years agoenvironment: Disable fullscreen unredirect during all transitions
Jonas Ådahl [Fri, 13 Sep 2019 09:51:41 +0000 (11:51 +0200)]
environment: Disable fullscreen unredirect during all transitions

When there is a transition, it's likely that we are animating some part
of the desktop, and in such situations we don't want to unredirect
fullscreen windows.

This fixes unwanted unredirection when e.g. hiding a modal dialog by
re-enabling the unredirection after the animation has finished, instead
of when it starts.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/721

7 years agoiconGrid: Only animate visible icons
Georges Basile Stavracas Neto [Sat, 31 Aug 2019 15:32:31 +0000 (12:32 -0300)]
iconGrid: Only animate visible icons

Mutter recently added an optimization to only allocate
visible children [1]. That broke ClutterClones, but it
was subsequently fixed [2].

However, that exposed a third problem, this time with
FrequentView: visible but transparent icons, that are
not allocated by the icon grid, were cloned and animated
during the spring animation.

Only animate visible icons with opacity greater than 0.

[1] https://gitlab.gnome.org/GNOME/mutter/commit/0eab73dc
[2] https://gitlab.gnome.org/GNOME/mutter/commit/08a3cbfc

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/696

7 years agoUpdate Italian translation
Milo Casagrande [Fri, 13 Sep 2019 12:55:53 +0000 (12:55 +0000)]
Update Italian translation

7 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 13 Sep 2019 06:27:06 +0000 (08:27 +0200)]
Updated Spanish translation

7 years agolookingGlass: Only update window list when visible
Georges Basile Stavracas Neto [Thu, 12 Sep 2019 18:45:04 +0000 (15:45 -0300)]
lookingGlass: Only update window list when visible

Updating the window list in the Looking Glass is a costly
operation: it destroys a whole lot of actors, and recreates
them. This triggers CSS changes, repaints, and allocations.

It is specially bad when paired with Wayland's big number
of window creations and deletions when showing Builder's
and Epiphany's popup window.

Only update the window list in the Looking Glass when it is
visible.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/556

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/719

7 years agoUpdate Swedish translation
Anders Jonsson [Thu, 12 Sep 2019 22:16:22 +0000 (22:16 +0000)]
Update Swedish translation

7 years agoci: Disable MR handling for now
Florian Müllner [Thu, 12 Sep 2019 12:50:22 +0000 (14:50 +0200)]
ci: Disable MR handling for now

We aren't quite ready to enforce non-legacy style for now, mostly due
to the xgettext bug that prevents us from using template strings in
some places, and vast amounts of legacy indentation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716

7 years agoci: Disallow legacy style in merge requests
Florian Müllner [Thu, 12 Sep 2019 11:51:26 +0000 (13:51 +0200)]
ci: Disallow legacy style in merge requests

In order to transition from the current legacy style to the modern
gjs one, use the MR line-filtering we used to do on common errors
to ensure new code complies with the new style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716

7 years agoci: Fail on any common lint errors
Florian Müllner [Thu, 12 Sep 2019 11:41:17 +0000 (13:41 +0200)]
ci: Fail on any common lint errors

Now that we fixed all pre-existing errors that are common between
regular and legacy configuration, we can stop filtering the result
by the lines modified by the merge request.

This will allow us to catch errors in merge requests that slipped
through until now, for example when leaving a newly-unused import
behind.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716

7 years agocleanup: Don't assume hasOwnProperty() method on objects
Florian Müllner [Sat, 29 Jun 2019 23:05:27 +0000 (01:05 +0200)]
cleanup: Don't assume hasOwnProperty() method on objects

Since ES5, it is possible to create objects with no prototype at all:

    let foo = Object.create(null);

Those object won't have any builtin properties like hasOwnProperty(),
which is why eslint added a corresponding rule to its default rule set.

While this isn't an issue that affects our code, there's no harm in fol-
lowing the recommendation and call the method through Object.prototype.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716

7 years agocleanup: "Only" use two indentation styles for object literals
Florian Müllner [Tue, 12 Feb 2019 14:02:09 +0000 (15:02 +0100)]
cleanup: "Only" use two indentation styles for object literals

We currently use no less than three different ways of indenting
object literals:

    let obj1 = {
        foo: 42,
        bar: 23,
    };

    let obj2 = { foo: 42,
                 bar: 23 };

    let obj3 = { foo: 42,
                 bar: 23
               };

The first is the one we want to use everywhere eventually, while the
second is the most commonly used "legacy" style.

It is the third one that is most problematic, as it throws off eslint
fairly badly: It violates both the rule to have consistent line breaks
in braces as well as the indentation style of both regular and legacy
configurations.

Fortunately the third style was mostly used for tween parameters, so
is quite rare after the Tweener purge. Get rid of the remaining ones
to cut down on pre-existing eslint errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716

7 years agocleanup: Stop using Mainloop module
Florian Müllner [Mon, 19 Aug 2019 18:50:33 +0000 (20:50 +0200)]
cleanup: Stop using Mainloop module

It is deprecated in favor of the regular GLib functions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/718

7 years agowindowMenu: Animate menu
GB_2 [Thu, 12 Sep 2019 16:01:46 +0000 (16:01 +0000)]
windowMenu: Animate menu

Most menus have an animation, so add one to the window menu for
consistency and better looks (like !712).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/717

7 years agoUpdate Persian translation
Danial Behzadi [Thu, 12 Sep 2019 12:27:27 +0000 (12:27 +0000)]
Update Persian translation

7 years agoUpdate Brazilian Portuguese translation
Enrico Nicoletto [Thu, 12 Sep 2019 11:35:40 +0000 (11:35 +0000)]
Update Brazilian Portuguese translation

7 years agoextensionSystem: Add missing return value
Florian Müllner [Thu, 12 Sep 2019 10:40:46 +0000 (12:40 +0200)]
extensionSystem: Add missing return value

_callExtensionInit() should return whether the extension was initialized
successfully or not, but the early return added in commit 2a9e065cfb
doesn't.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/715

7 years agoextensionSystem: Always disable multiple extensions in reverse order
Jonas Dreßler [Mon, 19 Nov 2018 11:26:16 +0000 (12:26 +0100)]
extensionSystem: Always disable multiple extensions in reverse order

Since disabling an extension will lead to disabling and re-enabling all
following extensions in the list, always disable multiple extensions by
looping through the list in reverse order.

This lowers the execution time of the event handlers quite a bit if many
extensions are installed.

Thanks to Philippe Troin for identifying the problem and proposing the
initial patch to change the extension order when reloading.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/177

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Only add to extensionOrder array if enabling worked
Jonas Dreßler [Mon, 9 Sep 2019 14:07:32 +0000 (16:07 +0200)]
extensionSystem: Only add to extensionOrder array if enabling worked

Only push uuids of newly enabled extensions to the `_extensionOrder`
array if enabling them was successful.

Otherwise, since `_callExtensionDisable()` doesn't remove uuids that
weren't successfully enabled from the array, those extensions get added
to the array multiple times when they're disabled and enabled.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Always enforce disallowing extensions using sessionMode
Jonas Dreßler [Wed, 11 Sep 2019 18:24:17 +0000 (20:24 +0200)]
extensionSystem: Always enforce disallowing extensions using sessionMode

It's currently possible to circumvent the `sessionMode.allowExtensions`
property: For already enabled extensions one can call reloadExtension
via DBus, for new extensions it's possible by adding the extension to
the enabled-extensions gsettings key and setting the
disable-extension-version-validation key (which triggers a reload of
`this._enabledExtensions`) and then calling reloadExtension via DBus.

So to enforce `allowExtensions` while still allowing to update
extensions and keeping the extensionSystem synced with various gsettings
keys, replace the checks for `this._enabled` with simple checks for
`Main.sessionMode.allowExtensions` inside `_callExtensionInit()` and
`_callExtensionEnable()`.

The remaining checks for `this._enabled` are only small optimizations to
prevent running code on irrelevant sessionMode updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Handle added or removed sessionMode extensions
Jonas Dreßler [Wed, 11 Sep 2019 18:18:20 +0000 (20:18 +0200)]
extensionSystem: Handle added or removed sessionMode extensions

Right now we're only handling added sessionMode extensions correctly on
sessionMode updates, also handle the other case and disable removed
sessionMode extensions on sessionMode updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Rename initted to initialized
Jonas Dreßler [Wed, 11 Sep 2019 18:15:04 +0000 (20:15 +0200)]
extensionSystem: Rename initted to initialized

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Log an extension error if loading the stylesheet failed
Jonas Dreßler [Wed, 11 Sep 2019 12:55:04 +0000 (14:55 +0200)]
extensionSystem: Log an extension error if loading the stylesheet failed

Instead of only logging a message that loading the extension stylesheet
failed and silently returning we should use `logExtensionError` for that
instead. This also sets the extension state to ERROR and makes sure we
don't try to enable it again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Check if extension exists before accessing property
Jonas Dreßler [Wed, 11 Sep 2019 12:36:18 +0000 (14:36 +0200)]
extensionSystem: Check if extension exists before accessing property

If the extension doesn't exist in the `this._extensions` Map, we'd try
to access `extension.dir` on undefined/null. So set the `dir` variable
after checking if `extension` is defined.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Fix a wrong error message
Jonas Dreßler [Wed, 11 Sep 2019 12:23:44 +0000 (14:23 +0200)]
extensionSystem: Fix a wrong error message

The extension object is added to the `this._extensions` Map inside
`createExtensionObject`, not inside `loadExtension`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionSystem: Remove unncessary return statements
Jonas Dreßler [Wed, 11 Sep 2019 12:54:13 +0000 (14:54 +0200)]
extensionSystem: Remove unncessary return statements

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agoextensionUtils: Check version variable for undefined first
Jonas Dreßler [Mon, 19 Nov 2018 11:26:16 +0000 (12:26 +0100)]
extensionUtils: Check version variable for undefined first

Avoid a warning message when trying to access requiredArray[2] by
checking if its undefined first.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96

7 years agodata: Lower TimeoutStartSec in systemd units
Iain Lane [Tue, 3 Sep 2019 11:45:24 +0000 (12:45 +0100)]
data: Lower TimeoutStartSec in systemd units

If there's a stubborn process in our cgroup, we shouldn't hang around
waiting for the default (30 seconds) before the session closes. We've
logged out, SIGTERMed and the thing is refusing to go away, let's not
make people hang around for ages.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/699

7 years agoUpdate Turkish translation
Emin Tufan Çetin [Thu, 12 Sep 2019 04:26:07 +0000 (04:26 +0000)]
Update Turkish translation

7 years agoworkspace: Minor clarification
Florian Müllner [Fri, 23 Feb 2018 21:48:50 +0000 (22:48 +0100)]
workspace: Minor clarification

Code and comment were based on the old get_input_rect() and get_outer_rect()
method names that were changed to the more appropriate get_buffer_rect() and
get_frame_rect() a long time ago.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/713

7 years agobackgroundMenu: Animate menu opening
Florian Müllner [Wed, 11 Sep 2019 20:00:39 +0000 (22:00 +0200)]
backgroundMenu: Animate menu opening

The animation was removed in commit 6a00a504d4fc for consistency with
other menus. However commit a9b12d5d737dc then *added* animations to
those just four minutes later.

So add back the original animations for consistency, both with menu
closing and with other menus.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1595

7 years agoUpdate German translation
Christian Kirbach [Wed, 11 Sep 2019 21:14:44 +0000 (21:14 +0000)]
Update German translation

7 years agoworkspaceThumbnails: Replace loops with Array.find()
Florian Müllner [Sat, 3 Aug 2019 16:39:40 +0000 (16:39 +0000)]
workspaceThumbnails: Replace loops with Array.find()

This is much more idiomatic and concise than iterating over
thumbnails until we find the one we are looking for.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agooverview: Minor cleanup
Florian Müllner [Tue, 20 Aug 2019 02:25:24 +0000 (04:25 +0200)]
overview: Minor cleanup

Safe one indentation level by combining conditions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agoworkspace: Use operator shorthand
Florian Müllner [Mon, 19 Aug 2019 19:12:21 +0000 (21:12 +0200)]
workspace: Use operator shorthand

Shorthands like a += b are well-established, so prefer them over the
less concise a = a + b.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agojsParse: Disambiguate regex
Florian Müllner [Tue, 20 Aug 2019 21:20:31 +0000 (23:20 +0200)]
jsParse: Disambiguate regex

Make it clear that /= is part of a regex and not an operator shorthand.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agoworkspace: Don't initialize variables to undefined
Florian Müllner [Mon, 19 Aug 2019 19:14:33 +0000 (21:14 +0200)]
workspace: Don't initialize variables to undefined

The declaration itself already does this implicitly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agocalendar: Use template strings over concatenation
Florian Müllner [Mon, 19 Aug 2019 19:12:21 +0000 (21:12 +0200)]
calendar: Use template strings over concatenation

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agoutil: Separate statements with linebreak
Florian Müllner [Mon, 19 Aug 2019 19:13:52 +0000 (21:13 +0200)]
util: Separate statements with linebreak

Our eslint rules will soon forbid more than one statement per line.
We already follow that rule except for one lone offender; fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agonetwork: Don't omit parens when constructing
Florian Müllner [Mon, 19 Aug 2019 19:13:01 +0000 (21:13 +0200)]
network: Don't omit parens when constructing

While it is legal to omit parentheses when invoking a constructor
with no arguments, we generally avoid that in our coding style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agomessageTray: Add missing linebreak
Florian Müllner [Mon, 19 Aug 2019 19:08:38 +0000 (21:08 +0200)]
messageTray: Add missing linebreak

Methods should be separated by an empty lines, even when short.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agoibusManager: Wrap line before dot
Florian Müllner [Mon, 19 Aug 2019 19:12:13 +0000 (21:12 +0200)]
ibusManager: Wrap line before dot

When chaining function calls, our coding style asks for the dot to
start the new line, not end the preceding one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agokbdA11yDialog: Avoid unnecessary ternary operators
Florian Müllner [Mon, 19 Aug 2019 19:22:20 +0000 (21:22 +0200)]
kbdA11yDialog: Avoid unnecessary ternary operators

A condition is already boolean, there's no point in explicitly
turning it into true/false.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agosystem: Properly separate statements
Florian Müllner [Mon, 19 Aug 2019 18:56:36 +0000 (20:56 +0200)]
system: Properly separate statements

Whoops, that's some typo that sneaked into commit 9c3b3320f8 ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agolookingGlass: Fix misleading typeof use
Florian Müllner [Mon, 19 Aug 2019 18:11:12 +0000 (20:11 +0200)]
lookingGlass: Fix misleading typeof use

typeof is an operator, not a function. Putting unneeded parentheses
around the expression obfuscates that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agocleanup: Remove left-over imports
Florian Müllner [Mon, 19 Aug 2019 17:26:31 +0000 (19:26 +0200)]
cleanup: Remove left-over imports

Unfortunately this slipped through our CI tests, as the script
filters errors by lines that are modified by the corresponding
merge request.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710

7 years agoUpdate Romanian translation
Daniel Șerbănescu [Wed, 11 Sep 2019 20:13:21 +0000 (20:13 +0000)]
Update Romanian translation

7 years agoUpdate Hungarian translation
Balázs Úr [Wed, 11 Sep 2019 20:11:51 +0000 (20:11 +0000)]
Update Hungarian translation

7 years agoUpdated Lithuanian translation
Aurimas Černius [Wed, 11 Sep 2019 19:37:29 +0000 (22:37 +0300)]
Updated Lithuanian translation